<template>
  <div>
    <div class="img-box">
      <img src="../assets/image/banner1.png" class="img" alt="">
    </div>
    <div class="padding-box join-box">
      <div class="join-content">
        <div class="title-box">
          <img src="../assets/image/zhuangshi.png" class="title-icon" alt="">
<!--          <div class="title-text">本月冠军喜报:<span>{{championInfo.championArea}}{{championInfo.championName}}佣金收入{{championInfo.championMoney}}元</span></div>-->
          <div class="title-text">本月冠军喜报:<span>重庆张**  佣金收入115,278元</span></div>
          <img src="../assets/image/zhuangshi.png" class="title-icon" alt="">
        </div>
        <div class="number-box">
          <div class="hengxian"></div>
<!--          <div class="number-text">目前贷投狗已有 <span>{{totalAgent}}</span> 个经纪人</div>-->
          <div class="number-text">目前贷投狗已有 <span>35802</span> 个经纪人</div>
          <div class="hengxian"></div>
        </div>
        <div class="input-box">
          <img src="../assets/image/phone2.png" class="phone2" alt="">
          <input type="number" v-model="joinPhone" placeholder="请填写您的手机号">
        </div>
        <div class="join-btn" @click="joinUs('join')">马上加入</div>
        <van-notice-bar left-icon="volume-o" background="rgba(0,0,0,0)" color="#999999" :scrollable="false">
          <van-swipe
              vertical
              class="notice-swipe"
              :autoplay="1500"
              :show-indicators="false"
          >
            <van-swipe-item v-for="(item,index) in notice" :key="index">{{item.area}}用户{{item.tel}}在{{item.time}}加入了贷投狗成为经纪人</van-swipe-item>
          </van-swipe>
        </van-notice-bar>


      </div>
    </div>
    <div class="bag-title">
      <div class="icon-line"></div>
      <div>全民经纪人权益</div>
    </div>
    <div class="padding-box">
      <div class="quanyi-box">
        <img src="../assets/image/tupian.png" class="tupian" alt="">
        <div class="info">
          <img src="../assets/image/xuanzhong.png" class="xuanzhong" alt="">
          <span>稳定全面的资金及资产类产品进件资源通道</span>
        </div>
        <div class="info">
          <img src="../assets/image/xuanzhong.png" class="xuanzhong" alt="">
          <span>可靠的返佣体系及高收入能力</span>
        </div>
        <div class="info">
          <img src="../assets/image/xuanzhong.png" class="xuanzhong" alt="">
          <span>丰富的产品体系实现职业自由</span>
        </div>
      </div>
    </div>
    <div class="bag-title">
      <div class="icon-line"></div>
      <div>贷投狗优势</div>
    </div>
    <div class="padding-box">
      <div class="youshi-box">
        <div class="menu menu1">
          <div class="menu-item">
            <img src="../assets/image/daikuan.png" class="menu-icon" alt="">
            <div class="title">10<span>年专业贷款服务</span></div>
            <span class="s-title">不动产金融超市</span>
          </div>
          <div class="menu-item">
            <img src="../assets/image/user.png" class="menu-icon" alt="">
            <div class="title">3<span>万用户共同选择</span></div>
            <span class="s-title">快速为你解决贷款需求</span>
          </div>
        </div>
        <div class="menu">
          <div class="menu-item">
            <img src="../assets/image/kefu.png" class="menu-icon" alt="">
            <div class="title">7*24<span>客服实时响应
</span></div>
            <span class="s-title">后台实时支援服务保障</span>
          </div>
          <div class="menu-item">
            <img src="../assets/image/guanjia.png" class="menu-icon" alt="">
            <div class="title">1v1<span>专属管家
</span></div>
            <span class="s-title">1对1专人服务</span>
          </div>
        </div>
      </div>

    </div>
    <div class="chb">加入贷投狗全民经纪人 <span>立拆现金红包</span></div>
    <div class="input-container">
      <div class="input-box">
        <img src="../assets/image/phone2.png" class="phone2" alt="">
        <input type="number" v-model="chbPhone" placeholder="请填写您的手机号">
      </div>
      <div class="join-btn" @click="joinUs('chb')">立即拆红包</div>
    </div>
    <div class="bag-title">
      <div class="icon-line"></div>
      <div>获佣产品服务</div>
    </div>
    <div class="padding-box Product-b">
      <div class="Product-service">
        <div class="title">资金类：</div>
        <div class="content-text">
          <div class="c-title">房屋抵押（一、二抵）</div>
          <div class="c-s-title">明星贷款产品，有无按揭均可贷
          </div>
        </div>
        <div class="content-text">
          <div class="c-title">信用贷款、企业贷款、按揭赎楼
          </div>
          <div class="c-s-title">完整的金融服务能力，提高其成单率
          </div>
        </div>
        <img src="../assets/image/zijing.png" class="zijing" alt="">
      </div>
      <div class="Product-service">
        <div class="title">资产类：</div>
        <div class="content-text">
          <div class="c-title">房屋分销（法拍房、避暑房、新房）
          </div>
          <div class="c-s-title">特价房源、全程金融方案支持卖无忧</div>
        </div>
        <img src="../assets/image/zichanbaoquan.png" class="zichanbaoquan" alt="">
      </div>
      <div class="Product-service">
        <div class="title">服务类：</div>
        <div class="content-text">
          <div class="c-title">代办代跑（信用卡办理、公积金代缴）
          </div>
          <div class="c-s-title">专业金融服务

          </div>
        </div>
        <img src="../assets/image/fuwu.png" class="zichanbaoquan" alt="">
      </div>
    </div>
    <div class="chb">佣金获取流程 轻松月入万元</div>
    <div class="input-container" >
      <img src="../assets/image/liucheng.png" class="liucheng" alt="">
      <div class="join-btn" @click="show=true">立即咨询 创建专属海报服务</div>
    </div>
    <div class="bag-title">
      <div class="icon-line"></div>
      <div>服务区域</div>
    </div>
    <div class="padding-box">

      <div class="map-box">
        <img src="../assets/image/map.png" class="map">
        <a href="tel:023-67456888" class="zx-phone">咨询电话 023-67456888</a>
      </div>
    </div>
    <!--    底部-->
    <div class="bottom">
      <a href="http://ws.daitougou.com/ws/userCli" class="bottom-item" >
        <img src="../assets/image/btn1.png" class="btn1">
        <span class="btn-text">在线咨询</span>
      </a>
      <div class="btn-line"></div>
      <div class="bottom-item">
        <img src="../assets/image/btn3.png" class="btn1">
        <a href="tel:023-67456888" class="btn-text">电话咨询</a>
      </div>
    </div>

    <!--    浮标-->
    <div class="fubiao">
      <a href="tel:023-67456888"> <img src="../assets/image/phone.png" class="phone-fb" alt=""></a>
     <a href="http://ws.daitougou.com/ws/userCli"> <img  src="../assets/image/zixun.png" class="phone-fb" alt=""></a>
    </div>
    <!--    二维码弹层-->
<!--    <code-layer v-show="show"></code-layer>-->
  </div>
</template>

<script>
// import  codeLayer from  "@/components/code";
import wxShare from "@/utils/share";
export default {
  name: "invite-sign",
  // components:{codeLayer},
  data(){
    return{
      championInfo:{},//冠军信息
      totalAgent:0, //经纪人数量
      notice:[],//公告
      userInfo:{
        extensionId:'',
        phone:''
      },//加入信息
      chbPhone:'',
      joinPhone:'',
      show:false,//二维码弹层
    }
  },
  mounted() {
    wxShare('加入贷投狗全民经纪人\n' +
        '零成本月赚万元佣金','稳定全面的资金及资产类产品进件资源通道','https://drxf-oss.oss-cn-chengdu.aliyuncs.com/static/photo/pro/shareTeamInvite.png');
    this.getChampionInfo();
    this.getTotalAgent();
    this.getNotice();
    this.userInfo.extensionId=this.$route.query.scene;
  },
  methods:{
    //提交
    submit(phone,type){
      this.userInfo.phone=phone;
      this.$axios.post('/html/apply/shareSignSave',this.userInfo).then(()=>{
        this.$toast.success('提交成功')
        if(type=='join'){
          this.joinPhone='';
        }else{
          this.chbPhone='';
        }
      })
    },
    //申请加入
    joinUs(type){
      if(type=='join'){
          if(this.joinPhone && this.joinPhone.length==11){
            this.submit(this.joinPhone,type);
          }else {
            this.$toast('请填写完整信息');
          }
      }else {
        if(this.chbPhone && this.chbPhone.length==11){
          this.submit(this.chbPhone,type);
        }else {
          this.$toast('请填写完整信息');
        }
      }

    },
    //获取公告
    getNotice(){
      this.$axios.get('/html/apply/notice').then(res=>{
        this.notice=res.data.data;
      })
    },
    //获取经纪人数量
    getTotalAgent(){
      this.$axios.get('/html/apply/totalAgent').then(res=>{
        this.totalAgent=res.data.data;
      })
    },
    //获取冠军信息
    getChampionInfo(){
      this.$axios.get('/html/apply/champion').then(res=>{
        this.championInfo=res.data.data;
      })
    },
  },
}
</script>

<style scoped lang="less">
.img-box {
  width: 100%;
  height: 341px;
}

.img {
  width: 100%;
  height: 100%;
}

.padding-box {
  padding: 0 15px;
}

.join-box {
  margin-top: -90px;
  position: relative;
  z-index: 99;
  margin-bottom: 20px;
}

.join-content {
  width: 100%;
  background-color: #fff;
  box-shadow: 0px 0px 18px 2px rgba(39, 39, 39, 0.08);
  border-radius: 10px;
  padding: 34px 10px 27px;

  .title-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;

    .title-icon {
      width: 17px;
      height: 9px;
    }

    .title-text {
      font-size: 14px;
      color: #333333;
      font-weight: bold;

      span {
        color: #FA330D;
      }
    }
  }

  .number-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;

    .hengxian {
      width: 20px;
      height: 1px;
      background-color: #999999;

    }

    .number-text {
      font-size: 13px;
      color: #999999;
      margin: 0 8px;

      span {
        color: #333333;
      }
    }
  }


}

.input-container {
  padding: 0 36px;
  margin-bottom: 40px;
}

.input-box {
  width: 100%;
  height: 40px;
  border: 1px solid #666666;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  margin-bottom: 15px;

  .phone2 {
    width: 10px;
    height: 16px;
    margin-right: 10px;
  }

  input {
    flex: 1;
    font-size: 14px;
    height: 100%;
    border: none;
  }
}

.join-btn {
  width: 100%;
  height: 45px;
  font-size: 18px;
  color: #FFFFFF;
  line-height: 45px;
  background: linear-gradient(0deg, #FF9C01 0%, #F5AC25 100%);
  box-shadow: 0px 5px 6px 0px rgba(255, 114, 0, 0.23);
  border-radius: 23px;
  text-align: center;
  margin-bottom: 20px;
}

.bag-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: bold;
  color: #333333;
  padding: 0 15px;
  margin-bottom: 13px;

  .icon-line {
    width: 3px;
    height: 13px;
    background: #FD9F07;
    margin-right: 6px;
  }
}

//权益
.quanyi-box {
  width: 100%;
  background-color: #fff;
  box-shadow: 0px 0px 19px 2px rgba(39, 39, 39, 0.08);
  border-radius: 10px;
  padding: 20px 15px 25px;
  margin-bottom: 21px;

  .tupian {
    width: 100%;
    height: 150px;
    border-radius: 5px;
    margin-bottom: 23px;
  }

  .info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;

    .xuanzhong {
      width: 14px;
      height: 14px;
      min-width: 14px;
      margin-right: 10px;
    }

    span {
      font-size: 13px;
      color: #333333;
    }
  }
}

//贷投狗优势
.youshi-box {
  width: 100%;
  background: #FFFFFF;
  box-shadow: 0px 0px 19px 2px rgba(39, 39, 39, 0.08);
  border-radius: 10px;
  padding: 30px 0;
  margin-bottom: 41px;

  .menu {
    display: flex;
    align-items: center;
    justify-content: center;

    .menu-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;

      .menu-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
      }

      .title {
        font-size: 16px;
        font-weight: bold;
        color: #333333;
        margin-bottom: 8px;

        span {
          font-size: 14px;
          font-weight: normal;
        }
      }

      .s-title {
        font-size: 11px;
        color: #999999;
      }
    }
  }

  .menu1 {
    margin-bottom: 24px;
  }
}

//拆红包
.chb {
  font-size: 16px;
  color: #333333;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;

  span {
    color: #FA330D;
  }
}

//产品服务
.Product-b {
  margin-bottom: 40px;
}

.Product-service {
  width: 100%;
  background: #FFFFFF;
  box-shadow: 0px 0px 19px 2px rgba(39, 39, 39, 0.08);
  border-radius: 10px;
  padding: 20px 15px;
  margin-bottom: 15px;
  position: relative;

  .title {
    font-size: 15px;
    font-weight: bold;
    color: #FA330D;
  }

  .content-text {
    margin-top: 12px;

    .c-title {
      font-size: 14px;
      color: #333333;
      margin-bottom: 13px;
    }

    .c-s-title {
      font-size: 11px;
      color: #999999;
    }
  }

  .zijing {
    width: 60px;
    height: 71px;
    position: absolute;
    right: 0;
    bottom: 0;
  }

  .zichanbaoquan {
    width: 60px;
    height: 65px;
    position: absolute;
    right: 0;
    bottom: 0;
  }

}

.liucheng {
  width: 100%;
  height: 70px;
  margin-bottom: 30px;

}

.map-box {
  width: 100%;
  background-color: #fff;
  box-shadow: 0px 0px 18px 2px rgba(39, 39, 39, 0.08);
  border-radius: 10px;
  padding: 26px 6px 20px;
  margin-bottom: 20px;
}

.map {
  width: 100%;
  height: 212px;
  display: inline-block;
  margin-bottom: 17px;
}

.zx-phone {
  display: block;
  width: 100%;
  height: 35px;
  background: #FDF1EF;
  line-height: 35px;
  font-size: 15px;
  font-weight: bold;
  color: #FA330D;
  text-align: center;
}

.bottom {
  width: 100%;
  height: 49px;
  background: #638CF6;
  display: flex;
  align-items: center;
}

.bottom-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: relative;
}

.btn1 {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.btn-text {
  font-size: 14px;
  color: #FFFFFF;
}

.btn-line {
  width: 1px;
  height: 18px;
  background: #FFFFFF;
}

//浮标
.fubiao {
  position: fixed;
  right: 0;
  bottom: 100px;
  z-index: 99;
}

.phone-fb {
  display: block;
  width: 35px;
  height: 30px;
  margin-bottom: 20px;
}
</style>
<style>
.notice-swipe {
  height: 20px;
  line-height: 20px;
  font-size: 11px;
}

.van-notice-bar {
  height: 20px;
  padding: 0;
}

.van-notice-bar__left-icon, .van-notice-bar__right-icon {
  color: #333333 !important;
  min-width: 18px;
  font-size: 15px;
}

</style>